//read in
import delimited "$dir/Model/identification_test_data.csv", clear
drop v1
destring v3, replace force
ren v2 val
ren v3 error

//dry run
forval i = 1/29{
	preserve
	//range of data
	local min = 11*(`i'-1) + 1
	local max = `i'*11

	//cleaning up
	keep if _n>=`min' & _n<=`max'
	su val if _n == 6
	local label = round(`r(mean)', .0001)
	local label_low = round(`r(mean)' - .05, .0001)
	local label_high = round(`r(mean)' + .05, .0001)

	//plot
	twoway line error val, xlabel(`label_low' `label' `label_high') ytitle("Value of Objective Function", size(large)) ///
	xtitle("Parameter Value", size(large)) graphregion(color(white)) ylabel(,labsize(medlarge)) xlabel(,labsize(medlarge)) bgcolor(white)
	graph export "$output/identification_test_`i'.png", replace
	graph close
	restore
}

//end of dofile